#include "Manager.h"
#include "WebsocketHandler.h"
#include "WIceAgent.h"

/*
* 1、websocket 通信，做信令通道
* 2、stun服务器，做媒体通道协商
* 3、rtp和rtcp协议，做媒体传输
*/

int main(int argc, char *argv[])
{
    struct mg_mgr *mgr = Manager::getInstance()->getMongooseMgr();
    mg_mgr_init(mgr);
    WIceAgent::init();

    WebsocketHandler wsHandler;
    wsHandler.start();

    while(1)
    {
        mg_mgr_poll(mgr, 1);
    }
    mg_mgr_free(mgr);

    WIceAgent::release();
    return 0;
}
